import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart';

class InkWellButton extends StatelessWidget{

  //点击功能
  Function onPressed;

  //子组件
  Widget child;


  InkWellButton({
    this.onPressed,
    this.child,

  });

  @override
  Widget build(BuildContext context) {

    return
      InkWell(
        onTap: (onPressed==null)?null:()=>onPressed(),
        child: child,
      );
  }
}